package com.example.high_slope_electronic_sand_table.surroundings.controller;

import com.example.high_slope_electronic_sand_table.surroundings.dto.SurrondingsDTO;
import com.example.high_slope_electronic_sand_table.surroundings.service.SurrondingsService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@Tag(name = "周边环境")
@RestController
@RequestMapping(value = "high-slope")
public class SurrondingsController {

    @Autowired
    private SurrondingsService surrondingsService;

    /**
     * 查询周边环境
     * @return
     */
    @Operation(summary = "周边环境")
    @GetMapping(value = "/surrondings")
    public SurrondingsDTO getSurrondings(){
        return surrondingsService.getSurrondings();
    }
}
